﻿
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel.Activation;
using System.ServiceModel;
using LightSO.Entity;
using LightSO.Business;
using LightSO.Extensions;


namespace LightSO.Model
{
	/// <summary>
	/// RecruitApply
	/// </summary>
	[DataContract]
	[ServiceContract]
	[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
	public  partial class RecruitApply  : EntityBase
	{
		public RecruitApply()
		{
			entity = new Entity.RecruitApply();
		}
		public RecruitApply(Entity.RecruitApply info)
		{
			entity = info;
		}
		private Entity.RecruitApply entity = null;
		new internal Entity.RecruitApply ToEntity()
		{
			return entity;
		}
		[DataMember]
		public long Id
		{
			get { return entity.Id; }
			set { entity.Id = value; }
		}
		[DataMember]
		public long RecruitId
		{
			get { return entity.RecruitId; }
			set { entity.RecruitId = value; }
		}
		[DataMember]
		public string Qq
		{
			get { return entity.Qq; }
			set { entity.Qq = value; }
		}
		[DataMember]
		public string Email
		{
			get { return entity.Email; }
			set { entity.Email = value; }
		}
		[DataMember]
		public string Mobile
		{
			get { return entity.Mobile; }
			set { entity.Mobile = value; }
		}
		[DataMember]
		public string Cv
		{
			get { return entity.Cv; }
			set { entity.Cv = value; }
		}
		[DataMember]
		public DateTime CreateOn
		{
			get { return entity.CreateOn; }
			set { entity.CreateOn = value; }
		}

        [OperationContract]
        [System.ServiceModel.Web.WebInvoke(
			Method = "POST", 
			ResponseFormat = System.ServiceModel.Web.WebMessageFormat.Json, 
			BodyStyle = System.ServiceModel.Web.WebMessageBodyStyle.WrappedRequest
        )]
        public RecruitApply Get(int id)
        {
			var entites = (new RecruitApplyBll()).Get(id);
			var models = entites.ConvertTo<Entity.RecruitApply, RecruitApply>();

			return models;
        }

        [OperationContract]
        [System.ServiceModel.Web.WebInvoke(
			Method = "POST", 
			ResponseFormat = System.ServiceModel.Web.WebMessageFormat.Json, 
			BodyStyle = System.ServiceModel.Web.WebMessageBodyStyle.WrappedRequest
        )]
        public void Save(RecruitApply info)
        {
			(new RecruitApplyBll()).Save(info.ToEntity());
        }

        [OperationContract]
        [System.ServiceModel.Web.WebInvoke(
			Method = "POST", 
			ResponseFormat = System.ServiceModel.Web.WebMessageFormat.Json, 
			BodyStyle = System.ServiceModel.Web.WebMessageBodyStyle.WrappedRequest
        )]
        public void Remove(int id)
        {
			(new RecruitApplyBll()).Remove(id);
        }

        [OperationContract]
        [System.ServiceModel.Web.WebInvoke(
			Method = "POST", 
			ResponseFormat = System.ServiceModel.Web.WebMessageFormat.Json, 
			BodyStyle = System.ServiceModel.Web.WebMessageBodyStyle.WrappedRequest
        )]
        public List<RecruitApply> Page(string pageIndex, string pageSize, string sort)
        {
			var entites = (new RecruitApplyBll()).Page(pageIndex,pageSize,sort);
			var models = entites.ConvertTo<List<Entity.RecruitApply>, List<RecruitApply>>();

			return models;
        }

        [OperationContract]
        [System.ServiceModel.Web.WebInvoke(
			Method = "POST", 
			ResponseFormat = System.ServiceModel.Web.WebMessageFormat.Json, 
			BodyStyle = System.ServiceModel.Web.WebMessageBodyStyle.WrappedRequest
        )]
        public List<RecruitApply> List(string sort)
        {
			var entites = (new RecruitApplyBll()).List(sort);
			var models = entites.ConvertTo<List<Entity.RecruitApply>, List<RecruitApply>>();

			return models;
        }

        [OperationContract]
        [System.ServiceModel.Web.WebInvoke(
			Method = "POST", 
			ResponseFormat = System.ServiceModel.Web.WebMessageFormat.Json, 
			BodyStyle = System.ServiceModel.Web.WebMessageBodyStyle.WrappedRequest
        )]
        public List<RecruitApply> Find(string keyword)
        {
			var entites = (new RecruitApplyBll()).Find(keyword);
			var models = entites.ConvertTo<List<Entity.RecruitApply>, List<RecruitApply>>();

			return models;
        }

	}
} 


